package com.hanhai.material.device.entity;

import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.RelationOneToMany;
import com.mybatisflex.annotation.RelationOneToOne;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 *  实体类。
 *
 * @author youchuang
 * @since 2023/10/18 11:26:03
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "sys_bom",dataSource = "device")
public class SysBom implements Serializable {

    @Id
    private String id;

    private String productId;

    private String productName;

    private BigDecimal productNum;

    private Date productDate;

    private Integer productIcmoId;

    private String productWorkShopId;

    private String productWorkShopName;

    private Integer classTypeId;

    private String productType;

    private String machineName;

    @RelationOneToMany(selfField ="productIcmoId",targetField = "productIcmoId",dataSource = "device")
    private List<SysBomChild> bomChildList;

    @RelationOneToOne(selfField ="productIcmoId",targetField = "interId",dataSource = "scheduling")
    private SysWorkPlan workPlan;

}
